﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MarryImageList.aspx.cs" Inherits="Com.CMS263.Web.manage.MarryInfo.MarryImageList" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
    <link href="../style/main.css" rel="stylesheet" type="text/css" />
    <link href="../common/validator.css" rel="stylesheet" type="text/css" />

    <script src="../../js/jquery-1.4.2.min.js" type="text/javascript"></script>
    <script src="../../js/common.js" type="text/javascript"></script>
    <style type="text/css">
        .style1
        {
        }
        .style2
        {
            height: 21px;
        }
    </style>
    <script language="javascript" type="text/javascript">
        function del(id, obj) {
            if (confirm('这是一个不可逆的操作，真的要删除此条记录')) {
                $.post("Marry_action.aspx?op=deleteMarryImage&&id=" + id, {}, function(data) {
                    if (data == "ok") {
                        alert('删除成功');
                        $(obj.parentNode.parentNode).remove();
                    }
                })
            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div style=" margin:12px"><a href="MarryImageAdd.aspx?id=<%=marryId %>">添加图片</a></div>
    <div>
        <table style="width: 100%;" class="table_1">
            <tr class="table_2">
                <td class="style2">
                    &nbsp;
                    编号</td>
                <td class="style2">
                    标题</td>
                <td class="style2">
                    婚姻</td>
                <td class="style2">
                    图片</td>
                <td class="style2">
                    操作</td>
            </tr>
            <%
                foreach (Com.CMS263.PO.MarryImage mi in miList)
                {
                 %>
            <tr>
                <td class="style1">
                   <%=mi.Id %>
                </td>
                <td>
                   <%=mi.Title%>
                </td>
                <td>
                    <%=mi.ProductTitle%>                  
                </td>
                <td>
                   <img src="/ArtUpFile/<%=mi.FilePath%>"  width="100px;" height="100px;"/></td>
                <td>
                   <a href="MarryImageEdit.aspx?id=<%=mi.Id %>&&page=<%=page %>"> 修改</a> <a href="#" onclick="del(<%=mi.Id %>,this)">删除</a></td>
            </tr>
            <%} %>
            <tr>
                <td style=" text-align:center" class="style1" colspan="5">
                   <%=GetPager()%>
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
